#include<bits/stdc++.h>
using namespace std;
#define int long long
inline int read()
{
    int x=0,f=1;
    char c=getchar();
    while(c<'0'||c>'9')
    {
        if(c=='-')
            f=-1;
        c=getchar();
    }
    while(c>='0'&&c<='9')
        x=(x<<3)+(x<<1)+(c^48),c=getchar();
    return x*f;
}
void write(int x)
{
    if(x<0)
        putchar('-'),x=-x;
    if(x>9)
        write(x/10);
    putchar('0'+x%10);
}
const int N=1e5+5;
int a[N],n;
map<int,int> mp;
signed main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    n=read();
    for(int i=1;i<=n;i++)
        mp[read()]++;
    map<int,int>::iterator it=mp.begin();
    int ans=n,tot=it->second;
    it++;
    for(;it!=mp.end();it++)
    {
        int tmp=min(it->second,tot);
        tot-=tmp;
        ans-=tmp;
        tot+=it->second;
    }
    write(ans);
    return 0;
}
